package com.kantboot.business.water.config;

import com.kantboot.business.water.service.IBusWaterGoodsOrderService;
import com.kantboot.functional.pay.wechat.service.IFunctionalPayWechatOrderService;
import jakarta.annotation.Resource;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;

@Configuration
public class OrderTaskConfig {

    @Resource
    private IBusWaterGoodsOrderService waterGoodsOrderService;

    @Resource
    private IFunctionalPayWechatOrderService functionalPayWechatOrderService;

    @Scheduled(fixedRate = 5000)
    public void orderTaskConfig() {
        functionalPayWechatOrderService.refreshOrderTaskStatus();
        waterGoodsOrderService.checkUnPayOrderTask();
    }
}
